/* parameter assocate array 
   return a html table */

function rowsToTable( keys, rows, col, value )
{
	var html = "<table border=\"1\"><tr>"
	for( key in keys )
	{
		html += "<th>"+key+"<th>";
	}
	html += "</tr>";
	
	for( row in rows )
	{
		html +="<tr>";
	
		for( key in keys )
		{
			html += "<td>"+row[key]+"<td>";
		}
		
		html +="</tr>";
	}

	html += "</table>";
	
	return html;
}